{% extends "::layout.html.twig" %}
{% block title "create payement type" %}
{% block content %}
{% include "EmoneyEpayBundle::left_menu.html.twig" %}
<div id="paymentinstructions">

</div>
<form action="{{ path('EmoneyEpayBundle_proceed_payment_set2') }}" method="post" {{ form_enctype(form) }}>
    {{ form_widget(form) }}

    <input type="submit" class="button" />
</form>
<div class="loading"></div>
<script>
jQuery(function(){
	jQuery(".loading").hide();
	jQuery(':input[name^="storePayment"]').change(function(){
	    jQuery(".loading").show();
		var DATA = 'paymentmode=' + this.value;
		jQuery.ajax({
			type: "POST",
			url: "{{ path('EmoneyEpayBundle_payment_instructions')}}",
			data: DATA,
			cache: false,
			success: function(data){
			jQuery('#paymentinstructions').html(data);
			jQuery(".loading").hide();
		}
		});
	return false;
	});
	
});
</script>
{% endblock %}
